package com.cheng.example.atguigu.design_pattern.proxy.staticproxy;

/*
 * @author 程帅
 * @createTime: 2020/10/15 13:08
 * @Created: with IntelliJ IDEA.
 */
public class Client {

    public static void main(String[] args) {
        //创建目标对象（被代理对象）
        TeacherDao teacherDao = new TeacherDao();
        //创建代理对象,同时将目标对象传递给代理对象
        TeacherDaoProxy teacherDaoProxy = new TeacherDaoProxy(teacherDao);
        //通过代理对象，调用到被代理对象的方法
        teacherDao.teach();
    }
}
